Problem reading utf8 on windows XP

Problem reading utf8 on windows XP

am 16.06.2009 10:57:17 von p n

--_2a59dff7-3a34-4393-ad3a-937874a67544_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable


Excuse me=2C if I haven't fully understood the subject here...

I have a postgres db 8.1.11 on Linux. The data is utf8-encoded in the db.=20
I have no problems reading or writing utf8 on Linux.

Now=2C when I try to read data on a machine running windows xp=2C with odbc=
version 8.02.04.00.
I cannot manage to read utf8. How do I do that?

I am a bit lost concerning how to configure odbc.
Which driver am I supposed to use to just get the "plain" utf8 right out of=
the database _without any conversions_?
Now it seems like I am getting some kind of mbcs or ISO-8859-1 encoded data=
or something like that.

I tried to use the Unicode driver. Is that the right one?

I am using visual studio 2005. There I have an option to set character enco=
ding. Now=2C if I choose to set it to UNICODE
I will get a compilation error=2C since then SQLConnect will be defiend as =
SQLConnectW=2C which in turn expects that I use WCHAR instead of CHAR and s=
imilar errors. I think I would like to just get utf8 data back in CHARs=2C =
not WCHARs.

Below is an excerpt of how I try to read data back. This seems to work on L=
inux where=20
everything seemingly work out as I expect.
rc =3D SQLGetData(_statementHandle=2C column=2C SQL_C_CHAR=2C valueBuf.get=
()=2C bufSize=2C &length)=3B


Moreover=2C I have not foun any documentation that brings clarity to the su=
bject=2C so if you have any=20
hints to where I could find documentation with examples I would be glad.

Best regards=2C
Paul.

____________________________________________________________ _____
Vem är du? Gör personlighetstestet p=E5 MSN Dejting!
http://dejting.se.msn.com/channel/index.aspx?trackingid=3D10 02952=

--_2a59dff7-3a34-4393-ad3a-937874a67544_
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable






Excuse me=2C if I haven't fully understood the subject here...

I hav=
e a postgres db 8.1.11 on Linux. The data is utf8-encoded in the db.
I =
have no problems reading or writing utf8 on Linux.

Now=2C when I try=
to read data on a machine running windows xp=2C with odbc version 8.02.04.=
00.
I cannot manage to read utf8. How do I do that?

I am a bit lo=
st concerning how to configure odbc.
Which driver am I supposed to use t=
o just get the "plain" utf8 right out of the database _without any conversi=
ons_?
Now it seems like I am getting some kind of mbcs or ISO-8859-1 enc=
oded data or something like that.

I tried to use the Unicode driver.=
Is that the right one?

I am using visual studio 2005. There I have =
an option to set character encoding. Now=2C if I choose to set it to UNICOD=
E
I will get a compilation error=2C since then SQLConnect will be defien=
d as SQLConnectW=2C which in turn expects that I use WCHAR instead of CHAR =
and similar errors. I think I would like to just get utf8 data back in CHAR=
s=2C not WCHARs.

Below is an excerpt of how I try to read data back.=
This seems to work on Linux where
everything seemingly work out as I e=
xpect.
 =3Brc =3D SQLGetData(_statementHandle=2C column=2C SQL_C_CHA=
R=2C valueBuf.get()=2C bufSize=2C &=3Blength)=3B


Moreover=2C =
I have not foun any documentation that brings clarity to the subject=2C so =
if you have any
hints to where I could find documentation with examples=
I would be glad.

Best regards=2C
Paul.


Gör pers=
onlighetstestet p=E5 MSN Dejting=2C se vem du passar ihop med! ttp://dejting.se.msn.com/channel/index.aspx?trackingid=3D100 2952' target=3D=
'_new'>MSN Dejting

=

--_2a59dff7-3a34-4393-ad3a-937874a67544_--